//
// Created by choumei on 2021/9/11.
//

#ifndef NETCLIENT_MYDEVICE_H
#define NETCLIENT_MYDEVICE_H

#include<QIODevice>
#include <QFile>
#include<MyBuffer.h>

class MyDevice : public QIODevice {
public:
    MyDevice(MyBuffer* buffer);

    qint64 readData(char *data, qint64 maxlen) override;

    qint64 writeData(const char *data, qint64 len) override;

private:
    QFile f;
    QFile f2;
    QByteArray array;
    int rId = 0;
    MyBuffer* buffer;
};


#endif //NETCLIENT_MYDEVICE_H
